<?php
class logout extends Controller{
	function index(){
		if($this->user->isLogged()){
	 	   $this->user->logout();
		}
		$this->response->redirect(MAIN_PAGE);
	}
}